/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.aseo.model.entity;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author usuario
 */
@Entity(name = "com.aseo.model.entity.Sector")
@Table(name = "sector")
public class Sector implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id_sector")
    private Long idSector;
    @Column(name = "descripcion")
    private String descripcion;
    @OneToMany(mappedBy = "idSector")
    private List<Reclamo> reclamoCollection;

    public Sector() {
    }

    public Sector(Long idSector) {
        this.idSector = idSector;
    }

    public Long getIdSector() {
        return idSector;
    }

    public void setIdSector(Long idSector) {
        this.idSector = idSector;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public List<Reclamo> getReclamoCollection() {
        return reclamoCollection;
    }

    public void setReclamoCollection(List<Reclamo> reclamoCollection) {
        this.reclamoCollection = reclamoCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idSector != null ? idSector.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sector)) {
            return false;
        }
        Sector other = (Sector) object;
        if ((this.idSector == null && other.idSector != null) || (this.idSector != null && !this.idSector.equals(other.idSector))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.aseo.model.entity.Sector[idSector=" + idSector + "]";
    }

}
